package com.ruoyi.web.controller.system;

import com.jsj.seafile.ServiceImpl;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

/**
 * 文件信息Controller
 *
 * @author ruoyi
 * @date 2022-09-08
 */
@RestController
@RequestMapping("/system/info")
public class SysFileLink {

    ServiceImpl serviceimpl=new ServiceImpl();
    @GetMapping("/GetLink")
    @ResponseBody
    @PreAuthorize("@ss.hasAnyRoles('teacher')")
    public String GetLink() throws IOException
    {
        System.out.println("get request");
        String str=serviceimpl.GetDownLink("/1/1/1/出师表.docx");
        return str;
    }
}
